package com.ea.common.enums;

/**
 * @author NAME-L
 * @Description TODO
 * @className DeliverStatusEnums
 * @date 2022-12-15 23:49:43
 */
public enum DeliverStatusEnums {

    BE_DELIVER(0, "未发货"),

    CONFIRM(1, "已发货"),

    SIGN(2, "已签收"),

    COMPLETED(3, "已退回"),

    DELIVER(4, "发货在途"),

    ARRIVED(5, "已送达"),

    ;
    private Integer code;

    private String msg;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    DeliverStatusEnums(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getDeliverStatus(Integer code) {
        for (DeliverStatusEnums enums : values()) {
            if (enums.getCode().equals(code)) {
                return enums.getMsg();
            }
        }
        return null;
    }
}
